package dominio.xml;

import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;


import dominio.beans.StockRodamiento;
import dominioSets.srv.SetStockRodamientos;

public class StockDeRodamientoXML {
	static XStream xStream;

	static{
		xStream = new XStream(new DomDriver());
		
	}
	
	public void pasarAXml (SetStockRodamientos stocks)
	{
		xStream.alias("Producto",StockRodamiento.class);
	
		xStream.toXML(stocks);
	}
	
	public SetStockRodamientos obtenerStock(){
		SetStockRodamientos stock;
		stock = (SetStockRodamientos) xStream.fromXML("Stock");
		return stock;
	}
	
	
}
